﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Web.UI.WebControls;
using System.Web.UI;

[assembly: TagPrefix("CodeWork.WebControls", "ucc")]
namespace CodeWork.WebControls
{
    [SupportsEventValidation, ValidationProperty("SelectedItem")]
    [ToolboxData("<{0}:CountryDropDownList runat=server></{0}:CountryDropDownList>")]
    public class CountryDropDownList : DropDownList
    {
        public override void DataBind()
        {
            this.Items.Add(new ListItem("Afghanistan (افغانستان)", "AF"));
            this.Items.Add(new ListItem("Aland Islands", "AX"));
            this.Items.Add(new ListItem("Albania (Shqipëria)", "AL"));
            this.Items.Add(new ListItem("Algeria (الجزائر)", "DZ"));
            this.Items.Add(new ListItem("American Samoa", "AS"));
            this.Items.Add(new ListItem("Andorra", "AD"));
            this.Items.Add(new ListItem("Angola", "AO"));
            this.Items.Add(new ListItem("Anguilla", "AI"));
            this.Items.Add(new ListItem("Antarctica", "AQ"));
            this.Items.Add(new ListItem("Antigua and Barbuda", "AG"));
            this.Items.Add(new ListItem("Argentina", "AR"));
            this.Items.Add(new ListItem("Armenia (Հայաստան)", "AM"));
            this.Items.Add(new ListItem("Aruba", "AW"));
            this.Items.Add(new ListItem("Australia", "AU"));
            this.Items.Add(new ListItem("Austria (Österreich)", "AT"));
            this.Items.Add(new ListItem("Azerbaijan (Azərbaycan)", "AZ"));
            this.Items.Add(new ListItem("Bahamas", "BS"));
            this.Items.Add(new ListItem("Bahrain (البحرين)", "BH"));
            this.Items.Add(new ListItem("Bangladesh (বাংলাদেশ)", "BD"));
            this.Items.Add(new ListItem("Barbados", "BB"));
            this.Items.Add(new ListItem("Belarus (Белару́сь)", "BY"));
            this.Items.Add(new ListItem("Belgium (België)", "BE"));
            this.Items.Add(new ListItem("Belize", "BZ"));
            this.Items.Add(new ListItem("Benin (Bénin)", "BJ"));
            this.Items.Add(new ListItem("Bermuda", "BM"));
            this.Items.Add(new ListItem("Bhutan (འབྲུག་ཡུལ)", "BT"));
            this.Items.Add(new ListItem("Bolivia", "BO"));
            this.Items.Add(new ListItem("Bosnia and Herzegovina (Bosna i Hercegovina)", "BA"));
            this.Items.Add(new ListItem("Botswana", "BW"));
            this.Items.Add(new ListItem("Bouvet Island", "BV"));
            this.Items.Add(new ListItem("Brazil (Brasil)", "BR"));
            this.Items.Add(new ListItem("British Indian Ocean Territory", "IO"));
            this.Items.Add(new ListItem("Brunei (Brunei Darussalam)", "BN"));
            this.Items.Add(new ListItem("Bulgaria (България)", "BG"));
            this.Items.Add(new ListItem("Burkina Faso", "BF"));
            this.Items.Add(new ListItem("Burundi (Uburundi)", "BI"));
            this.Items.Add(new ListItem("Cambodia (Kampuchea)", "KH"));
            this.Items.Add(new ListItem("Cameroon (Cameroun)", "CM"));
            this.Items.Add(new ListItem("Canada", "CA"));
            this.Items.Add(new ListItem("Cape Verde (Cabo Verde)", "CV"));
            this.Items.Add(new ListItem("Cayman Islands", "KY"));
            this.Items.Add(new ListItem("Central African Republic (République Centrafricaine)", "CF"));
            this.Items.Add(new ListItem("Chad (Tchad)", "TD"));
            this.Items.Add(new ListItem("Chile", "CL"));
            this.Items.Add(new ListItem("China (中国)", "CN"));
            this.Items.Add(new ListItem("Christmas Island", "CX"));
            this.Items.Add(new ListItem("Cocos Islands", "CC"));
            this.Items.Add(new ListItem("Colombia", "CO"));
            this.Items.Add(new ListItem("Comoros (Comores)", "KM"));
            this.Items.Add(new ListItem("Congo", "CG"));
            this.Items.Add(new ListItem("Congo, Democratic Republic of the", "CD"));
            this.Items.Add(new ListItem("Cook Islands", "CK"));
            this.Items.Add(new ListItem("Costa Rica", "CR"));
            this.Items.Add(new ListItem("Côte d&#39;Ivoire", "CI"));
            this.Items.Add(new ListItem("Croatia (Hrvatska)", "HR"));
            this.Items.Add(new ListItem("Cuba", "CU"));
            this.Items.Add(new ListItem("Cyprus (Κυπρος)", "CY"));
            this.Items.Add(new ListItem("Czech Republic (Česko)", "CZ"));
            this.Items.Add(new ListItem("Denmark (Danmark)", "DK"));
            this.Items.Add(new ListItem("Djibouti", "DJ"));
            this.Items.Add(new ListItem("Dominica", "DM"));
            this.Items.Add(new ListItem("Dominican Republic", "DO"));
            this.Items.Add(new ListItem("Ecuador", "EC"));
            this.Items.Add(new ListItem("Egypt (مصر)", "EG"));
            this.Items.Add(new ListItem("El Salvador", "SV"));
            this.Items.Add(new ListItem("Equatorial Guinea (Guinea Ecuatorial)", "GQ"));
            this.Items.Add(new ListItem("Eritrea (Ertra)", "ER"));
            this.Items.Add(new ListItem("Estonia (Eesti)", "EE"));
            this.Items.Add(new ListItem("Ethiopia (Ityop&#39;iya)", "ET"));
            this.Items.Add(new ListItem("Falkland Islands", "FK"));
            this.Items.Add(new ListItem("Faroe Islands", "FO"));
            this.Items.Add(new ListItem("Fiji", "FJ"));
            this.Items.Add(new ListItem("Finland (Suomi)", "FI"));
            this.Items.Add(new ListItem("France", "FR"));
            this.Items.Add(new ListItem("French Guiana", "GF"));
            this.Items.Add(new ListItem("French Polynesia", "PF"));
            this.Items.Add(new ListItem("French Southern Territories", "TF"));
            this.Items.Add(new ListItem("Gabon", "GA"));
            this.Items.Add(new ListItem("Gambia", "GM"));
            this.Items.Add(new ListItem("Georgia (საქართველო)", "GE"));
            this.Items.Add(new ListItem("Germany (Deutschland)", "DE"));
            this.Items.Add(new ListItem("Ghana", "GH"));
            this.Items.Add(new ListItem("Gibraltar", "GI"));
            this.Items.Add(new ListItem("Greece (Ελλάς)", "GR"));
            this.Items.Add(new ListItem("Greenland", "GL"));
            this.Items.Add(new ListItem("Grenada", "GD"));
            this.Items.Add(new ListItem("Guadeloupe", "GP"));
            this.Items.Add(new ListItem("Guam", "GU"));
            this.Items.Add(new ListItem("Guatemala", "GT"));
            this.Items.Add(new ListItem("Guernsey", "GG"));
            this.Items.Add(new ListItem("Guinea (Guinée)", "GN"));
            this.Items.Add(new ListItem("Guinea-Bissau (Guiné-Bissau)", "GW"));
            this.Items.Add(new ListItem("Guyana", "GY"));
            this.Items.Add(new ListItem("Haiti (Haïti)", "HT"));
            this.Items.Add(new ListItem("Heard Island and McDonald Islands", "HM"));
            this.Items.Add(new ListItem("Honduras", "HN"));
            this.Items.Add(new ListItem("Hong Kong", "HK"));
            this.Items.Add(new ListItem("Hungary (Magyarország)", "HU"));
            this.Items.Add(new ListItem("Iceland (Ísland)", "IS"));
            this.Items.Add(new ListItem("India", "IN"));
            this.Items.Add(new ListItem("Indonesia", "ID"));
            this.Items.Add(new ListItem("Iran (ایران)", "IR"));
            this.Items.Add(new ListItem("Iraq (العراق)", "IQ"));
            this.Items.Add(new ListItem("Ireland", "IE"));
            this.Items.Add(new ListItem("Isle of Man", "IM"));
            this.Items.Add(new ListItem("Israel (ישראל)", "IL"));
            this.Items.Add(new ListItem("Italy (Italia)", "IT"));
            this.Items.Add(new ListItem("Jamaica", "JM"));
            this.Items.Add(new ListItem("Japan (日本)", "JP"));
            this.Items.Add(new ListItem("Jersey", "JE"));
            this.Items.Add(new ListItem("Jordan (الاردن)", "JO"));
            this.Items.Add(new ListItem("Kazakhstan (Қазақстан)", "KZ"));
            this.Items.Add(new ListItem("Kenya", "KE"));
            this.Items.Add(new ListItem("Kiribati", "KI"));
            this.Items.Add(new ListItem("Kuwait (الكويت)", "KW"));
            this.Items.Add(new ListItem("Kyrgyzstan (Кыргызстан)", "KG"));
            this.Items.Add(new ListItem("Laos (ນລາວ)", "LA"));
            this.Items.Add(new ListItem("Latvia (Latvija)", "LV"));
            this.Items.Add(new ListItem("Lebanon (لبنان)", "LB"));
            this.Items.Add(new ListItem("Lesotho", "LS"));
            this.Items.Add(new ListItem("Liberia", "LR"));
            this.Items.Add(new ListItem("Libya (ليبيا)", "LY"));
            this.Items.Add(new ListItem("Liechtenstein", "LI"));
            this.Items.Add(new ListItem("Lithuania (Lietuva)", "LT"));
            this.Items.Add(new ListItem("Luxembourg (Lëtzebuerg)", "LU"));
            this.Items.Add(new ListItem("Macao", "MO"));
            this.Items.Add(new ListItem("Macedonia (Македонија)", "MK"));
            this.Items.Add(new ListItem("Madagascar (Madagasikara)", "MG"));
            this.Items.Add(new ListItem("Malawi", "MW"));
            this.Items.Add(new ListItem("Malaysia", "MY"));
            this.Items.Add(new ListItem("Maldives (ގުޖޭއްރާ ޔާއްރިހޫމްޖ)", "MV"));
            this.Items.Add(new ListItem("Mali", "ML"));
            this.Items.Add(new ListItem("Malta", "MT"));
            this.Items.Add(new ListItem("Marshall Islands", "MH"));
            this.Items.Add(new ListItem("Martinique", "MQ"));
            this.Items.Add(new ListItem("Mauritania (موريتانيا)", "MR"));
            this.Items.Add(new ListItem("Mauritius", "MU"));
            this.Items.Add(new ListItem("Mayotte", "YT"));
            this.Items.Add(new ListItem("Mexico (México)", "MX"));
            this.Items.Add(new ListItem("Micronesia", "FM"));
            this.Items.Add(new ListItem("Moldova", "MD"));
            this.Items.Add(new ListItem("Monaco", "MC"));
            this.Items.Add(new ListItem("Mongolia (Монгол Улс)", "MN"));
            this.Items.Add(new ListItem("Montenegro (Црна Гора)", "ME"));
            this.Items.Add(new ListItem("Montserrat", "MS"));
            this.Items.Add(new ListItem("Morocco (المغرب)", "MA"));
            this.Items.Add(new ListItem("Mozambique (Moçambique)", "MZ"));
            this.Items.Add(new ListItem("Myanmar (Burma)", "MM"));
            this.Items.Add(new ListItem("Namibia", "NA"));
            this.Items.Add(new ListItem("Nauru (Naoero)", "NR"));
            this.Items.Add(new ListItem("Nepal (नेपाल)", "NP"));
            this.Items.Add(new ListItem("Netherlands (Nederland)", "NL"));
            this.Items.Add(new ListItem("Netherlands Antilles", "AN"));
            this.Items.Add(new ListItem("New Caledonia", "NC"));
            this.Items.Add(new ListItem("New Zealand", "NZ"));
            this.Items.Add(new ListItem("Nicaragua", "NI"));
            this.Items.Add(new ListItem("Niger", "NE"));
            this.Items.Add(new ListItem("Nigeria", "NG"));
            this.Items.Add(new ListItem("Niue", "NU"));
            this.Items.Add(new ListItem("Norfolk Island", "NF"));
            this.Items.Add(new ListItem("Northern Mariana Islands", "MP"));
            this.Items.Add(new ListItem("North Korea (조선)", "KP"));
            this.Items.Add(new ListItem("Norway (Norge)", "NO"));
            this.Items.Add(new ListItem("Oman (عمان)", "OM"));
            this.Items.Add(new ListItem("Pakistan (پاکستان)", "PK"));
            this.Items.Add(new ListItem("Palau (Belau)", "PW"));
            this.Items.Add(new ListItem("Palestinian Territory", "PS"));
            this.Items.Add(new ListItem("Panama (Panamá)", "PA"));
            this.Items.Add(new ListItem("Papua New Guinea", "PG"));
            this.Items.Add(new ListItem("Paraguay", "PY"));
            this.Items.Add(new ListItem("Peru (Perú)", "PE"));
            this.Items.Add(new ListItem("Philippines (Pilipinas)", "PH"));
            this.Items.Add(new ListItem("Pitcairn", "PN"));
            this.Items.Add(new ListItem("Poland (Polska)", "PL"));
            this.Items.Add(new ListItem("Portugal", "PT"));
            this.Items.Add(new ListItem("Puerto Rico", "PR"));
            this.Items.Add(new ListItem("Qatar (قطر)", "QA"));
            this.Items.Add(new ListItem("Reunion", "RE"));
            this.Items.Add(new ListItem("Romania (România)", "RO"));
            this.Items.Add(new ListItem("Russia (Россия)", "RU"));
            this.Items.Add(new ListItem("Rwanda", "RW"));
            this.Items.Add(new ListItem("Saint Helena", "SH"));
            this.Items.Add(new ListItem("Saint Kitts and Nevis", "KN"));
            this.Items.Add(new ListItem("Saint Lucia", "LC"));
            this.Items.Add(new ListItem("Saint Pierre and Miquelon", "PM"));
            this.Items.Add(new ListItem("Saint Vincent and the Grenadines", "VC"));
            this.Items.Add(new ListItem("Samoa", "WS"));
            this.Items.Add(new ListItem("San Marino", "SM"));
            this.Items.Add(new ListItem("São Tomé and Príncipe", "ST"));
            this.Items.Add(new ListItem("Saudi Arabia (المملكة العربية السعودية)", "SA"));
            this.Items.Add(new ListItem("Senegal (Sénégal)", "SN"));
            this.Items.Add(new ListItem("Serbia (Србија)", "RS"));
            this.Items.Add(new ListItem("Serbia and Montenegro (Србија и Црна Гора)", "CS"));
            this.Items.Add(new ListItem("Seychelles", "SC"));
            this.Items.Add(new ListItem("Sierra Leone", "SL"));
            this.Items.Add(new ListItem("Singapore (Singapura)", "SG"));
            this.Items.Add(new ListItem("Slovakia (Slovensko)", "SK"));
            this.Items.Add(new ListItem("Slovenia (Slovenija)", "SI"));
            this.Items.Add(new ListItem("Solomon Islands", "SB"));
            this.Items.Add(new ListItem("Somalia (Soomaaliya)", "SO"));
            this.Items.Add(new ListItem("South Africa", "ZA"));
            this.Items.Add(new ListItem("South Georgia and the South Sandwich Islands", "GS"));
            this.Items.Add(new ListItem("South Korea (한국)", "KR"));
            this.Items.Add(new ListItem("Spain (España)", "ES"));
            this.Items.Add(new ListItem("Sri Lanka", "LK"));
            this.Items.Add(new ListItem("Sudan (السودان)", "SD"));
            this.Items.Add(new ListItem("Suriname", "SR"));
            this.Items.Add(new ListItem("Svalbard and Jan Mayen", "SJ"));
            this.Items.Add(new ListItem("Swaziland", "SZ"));
            this.Items.Add(new ListItem("Sweden (Sverige)", "SE"));
            this.Items.Add(new ListItem("Switzerland (Schweiz)", "CH"));
            this.Items.Add(new ListItem("Syria (سوريا)", "SY"));
            this.Items.Add(new ListItem("Taiwan (台灣)", "TW"));
            this.Items.Add(new ListItem("Tajikistan (Тоҷикистон)", "TJ"));
            this.Items.Add(new ListItem("Tanzania", "TZ"));
            this.Items.Add(new ListItem("Thailand (ราชอาณาจักรไทย)", "TH"));
            this.Items.Add(new ListItem("Timor-Leste", "TL"));
            this.Items.Add(new ListItem("Togo", "TG"));
            this.Items.Add(new ListItem("Tokelau", "TK"));
            this.Items.Add(new ListItem("Tonga", "TO"));
            this.Items.Add(new ListItem("Trinidad and Tobago", "TT"));
            this.Items.Add(new ListItem("Tunisia (تونس)", "TN"));
            this.Items.Add(new ListItem("Turkey (Türkiye)", "TR"));
            this.Items.Add(new ListItem("Turkmenistan (Türkmenistan)", "TM"));
            this.Items.Add(new ListItem("Turks and Caicos Islands", "TC"));
            this.Items.Add(new ListItem("Tuvalu", "TV"));
            this.Items.Add(new ListItem("Uganda", "UG"));
            this.Items.Add(new ListItem("Ukraine (Україна)", "UA"));
            this.Items.Add(new ListItem("United Arab Emirates (الإمارات العربيّة المتّحدة)", "AE"));
            this.Items.Add(new ListItem("United Kingdom", "GB"));
            this.Items.Add(new ListItem("United States", "US"));
            this.Items.Add(new ListItem("United States minor outlying islands", "UM"));
            this.Items.Add(new ListItem("Uruguay", "UY"));
            this.Items.Add(new ListItem("Uzbekistan (O&#39;zbekiston)", "UZ"));
            this.Items.Add(new ListItem("Vanuatu", "VU"));
            this.Items.Add(new ListItem("Vatican City (Città del Vaticano)", "VA"));
            this.Items.Add(new ListItem("Venezuela", "VE"));
            this.Items.Add(new ListItem("Vietnam (Việt Nam)", "VN"));
            this.Items.Add(new ListItem("Virgin Islands, British", "VG"));
            this.Items.Add(new ListItem("Virgin Islands, U.S.", "VI"));
            this.Items.Add(new ListItem("Wallis and Futuna", "WF"));
            this.Items.Add(new ListItem("Western Sahara (الصحراء الغربية)", "EH"));
            this.Items.Add(new ListItem("Yemen (اليمن)", "YE"));
            this.Items.Add(new ListItem("Zambia", "ZM"));
            this.Items.Add(new ListItem("Zimbabwe", "ZW"));

            if (FirstItem != string.Empty)
            {
                this.Items.Insert(0, new ListItem(FirstItem, "-1"));
            }

            base.DataBind();
        }

        string _firstItem = "Select Country";
        public string FirstItem
        {
            get { return _firstItem; }
            set { _firstItem = value; }
        }
    }

    [SupportsEventValidation, ValidationProperty("SelectedItem")]
    [ToolboxData("<{0}:MonthDropDownList runat=server></{0}:MonthDropDownList>")]
    public class MonthDropDownList : DropDownList
    {
        public override void DataBind()
        {
            this.Items.Add(new ListItem("January", "1"));
            this.Items.Add(new ListItem("February", "2"));
            this.Items.Add(new ListItem("March", "3"));
            this.Items.Add(new ListItem("April", "4"));
            this.Items.Add(new ListItem("May", "5"));
            this.Items.Add(new ListItem("June", "6"));
            this.Items.Add(new ListItem("July", "7"));
            this.Items.Add(new ListItem("August", "8"));
            this.Items.Add(new ListItem("September", "9"));
            this.Items.Add(new ListItem("October", "10"));
            this.Items.Add(new ListItem("November", "11"));
            this.Items.Add(new ListItem("December", "12"));

            if (FirstItem != string.Empty)
            {
                this.Items.Insert(0, new ListItem(FirstItem, "-1"));
            }

            base.DataBind();
        }

        string _firstItem = "Select Month";
        public string FirstItem
        {
            get { return _firstItem; }
            set { _firstItem = value; }
        }
    }
}

